package org.cbyyx.tc.model.vo.userResponse;

import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

@Data
public class UserVO implements Serializable {

    /**
     * 用户ID
     */
    private Long id;

    /**
     * 账号
     */
    private String account;

    /**
     * 用户名
     */
    private String username;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 联系电话
     */
    private String phone;

    /**
     * 用户角色
     */
    private String role;

    private static final long serialVersionUID = 135894523518L;


    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        UserVO userVO = (UserVO) o;
        return Objects.equals(id, userVO.id) && Objects.equals(account, userVO.account) && Objects.equals(username, userVO.username) && Objects.equals(email, userVO.email) && Objects.equals(phone, userVO.phone) && Objects.equals(role, userVO.role);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, account, username, email, phone, role);
    }

}
